package paas.storage.dto;

import com.alibaba.fastjson.annotation.JSONField;

/**
 * 列簇描述信息
 *[{
 * 	"Name": "CF1",
 * 	"Version": 1,
 * 	"Compression": "SNAPPY",
 * 	"TimeToLive": 5184000,
 * 	"BlockCache": "True"
 * }]
 * @author xufeng
 * @version 1.0
 * @date 2021/1/23
 */
public class ColumnFamilyModel {

    /**
     * 列族名称
     */
    @JSONField(name = "Name")
    private String name;

    /**
     * 版本号
     */
    @JSONField(name = "Version")
    private int version;

    /**
     * 压缩格式
     */
    @JSONField(name = "Compression")
    private String compression;
    /**
     * 数据保存时间
     */
    @JSONField(name = "TimeToLive")
    private int timeToLive;
    /**
     * 是否开启缓
     *         存
     */
    @JSONField(name = "BlockCache")
    private Boolean  blockCache;


    public ColumnFamilyModel(String name, int version, String compression, int timeToLive, Boolean blockCache) {
        this.name = name;
        this.version = version;
        this.compression = compression;
        this.timeToLive = timeToLive;
        this.blockCache = blockCache;
    }

    public ColumnFamilyModel() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getVersion() {
        return version;
    }

    public void setVersion(int version) {
        this.version = version;
    }

    public String getCompression() {
        return compression;
    }

    public void setCompression(String compression) {
        this.compression = compression;
    }

    public int getTimeToLive() {
        return timeToLive;
    }

    public void setTimeToLive(int timeToLive) {
        this.timeToLive = timeToLive;
    }

    public Boolean getBlockCache() {
        return blockCache;
    }

    public void setBlockCache(Boolean blockCache) {
        this.blockCache = blockCache;
    }

    @Override
    public String toString() {
        return "ColumnFamilyModel{" +
                "name='" + name + '\'' +
                ", version=" + version +
                ", compression='" + compression + '\'' +
                ", timeToLive=" + timeToLive +
                ", blockCache=" + blockCache +
                '}';
    }
}
